import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'

const routes:Array<RouteRecordRaw> = [
    {
        path:"/",
        component:()=> import('../UserViews/Login.vue')
    },
    {
        path:"/Test",
        component:()=> import('../Test/TestAddMapLabel.vue')
    },
    {
        path:"/login",
        component:()=> import('../UserViews/Login.vue')
    },
    {
        path:"/register",
        component:()=> import('../UserViews/Register.vue')
    },
    {
        path:"/home",
        component:()=> import('../MainViews/Home.vue')
    },
    {
        path:"/organization",
        component:()=> import('../TaskManageViews/Organization.vue')
    },
    {
        path:"/upload",
        component:()=> import('../TaskManageViews/CreateTask.vue')
    },
    {
        path:"/selectMap",
        component:()=> import('../TaskManageViews/SelectMap.vue')
    },
    {
        path:"/showTask",
        component:()=> import('../TaskManageViews/ShowTask.vue')
    },
    {
        path:"/modifyTaskBase",
        component:()=> import('../TaskManageViews/modifyTaskBase.vue')
    },
    {
        path:"/modifyTaskMap",
        component:()=> import('../TaskManageViews/modifyTaskMap.vue')
    },
    {
        path:"/showCheckerTask",
        component:()=> import('../TaskManageViews/showCheckerTask.vue')
    },
    {
        path:"/showSubmitterTask",
        component:()=> import('../TaskManageViews/showSubmitterTask.vue')
    },
    {
        path:"/checkTask",
        component:()=> import('../TaskManageViews/checkTask.vue')
    },
    {
        path:"/uploadTask",
        component:()=> import('../TaskManageViews/uploadTask.vue')
    },
    {
        path:"/showTaskUploaded",
        component:()=> import('../TaskManageViews/showTaskUploaded.vue')
    },
    {
        path:"/getSubmitUserLoc",
        component:()=> import('../TaskManageViews/getSubmitUserLoc.vue')
    },

]

const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router
//把上面创建的router 传出去
//然后需要在main.ts注册一下这个router, 因为它相当于一个插件